const bodyParser = require('body-parser')
module.exports = app => {
	app.use(bodyParser.json())
	app.post('/api/login', (req, res) => {
		const { username, password } = req.body;
		if (username === 'admin' && password === '123456') {
			res.send({
				code: 200,
				message: '登录成功， 欢迎admin用户'
			})
		} else {
			res.send({
				code: 403,
				message: '账户密码错误， 请重新登录'
			})
		}
	})
}